/*
 * BaseAxis.java
 * $Id: $
 *
 * Revision History
 *
 * Date             |  Programmer   |  Notes
 * ----------------------------------------------------------
 * Jul 17, 2009        |      Zhengnan Zhou         |  initial
 * 
 * 
 * **********************************************************
 */
package tofc.elements;

import tofc.BaseOFC;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * Class description goes here.
 * 
 * @author		Zhengnan Zhou
 * @version 	$Revision$, Jul 17, 2009
 */
public abstract class BaseAxis extends BaseOFC{
    
    
    private String color;
    private String gridColor;
    private boolean offset;
    private Integer min;
    private Integer max;
    private Integer step;
    private Integer stroke;
    private Label labels;
    


    public BaseAxis(){
        this.color ="#000000";
        this.gridColor="#000000";
        this.offset=true;
        //this.step=1;
        //this.stroke=1;
        //this.max = 10;
        //this.min = 1;
    }    

    /**
     * @return the color
     */
    public String getColor() {
        return color;
    }

    /**
     * @param color the color to set
     */
    public void setColor(String color) {
        this.color = color;
    }

    /**
     * @return the grid_color
     */
    public String getGridColor() {
        return gridColor;
    }

    /**
     * @param grid_color the grid_color to set
     */
    public void setGridColor(String gridColor) {
        this.gridColor = gridColor;
    }

    /**
     * @return the offset
     */
    public boolean isOffset() {
        return offset;
    }

    /**
     * @param offset the offset to set
     */
    public void setOffset(boolean offset) {
        this.offset = offset;
    }

    /**
     * @return the min
     */
    public int getMin() {
        return min;
    }

    /**
     * @param min the min to set
     */
    public void setMin(int min) {
        this.min = min;
    }

    /**
     * @return the max
     */
    public int getMax() {
        return max;
    }

    /**
     * @param max the max to set
     */
    public void setMax(int max) {
        this.max = max;
    }

    /**
     * @return the step
     */
    public int getStep() {
        return step;
    }

    /**
     * @param step the step to set
     */
    public void setStep(int step) {
        this.step = step;
    }
    
    /**
     * 
     * @param min
     * @param max
     * @param step
     */
    protected void setRange(int min, int max, int step){
        this.min = min;
        this.max = max;
        this.step = step>1?step:1;
    }

    /**
     *
     * @param min
     * @param max
     */
    protected void setRange(int min, int max){
        this.min = min;
        this.max = max;
        this.step = 1;
    }

    public Label getLabels() {
        return labels;
    }

    public void setLabels(Label labels) {
        this.labels = labels;
    }

    public int getStroke() {
        return stroke;
    }

    public void setStroke(int stroke) {
        this.stroke = stroke;
    }

}
